const i18NT = window.$app.t,
  ellipsis = true,
  tooltip = true;

export const WF_STATUS = {
  NEW: '10',
  PUB: '20',
};

export const WF_STATUS_TEXT = {
  [WF_STATUS.NEW]: i18NT('statusCreate'),
  [WF_STATUS.PUB]: i18NT('statusRelease'),
};

export const convertStatus = (arg: string) => {
  return WF_STATUS_TEXT[arg];
};

export const MAIN_TABLE_CONFIG = [
  { title: i18NT('workflowNumber'), dataIndex: 'workflowNumber', width: 150, ellipsis, tooltip },
  { title: i18NT('workflowName'), dataIndex: 'name', width: 150, ellipsis, tooltip },
  { title: i18NT('moduleName'), dataIndex: 'moduleName', width: 150, ellipsis, tooltip },
  { title: i18NT('workflowCategoryDesc'), dataIndex: 'workflowCategoryDesc', width: 150, ellipsis, tooltip },
  { title: i18NT('formName'), dataIndex: 'formName', width: 150, ellipsis, tooltip },
  { title: i18NT('status'), dataIndex: 'status', width: 100, ellipsis, tooltip },
  { title: i18NT('workflowNameEn'), dataIndex: 'nameEn', width: 150, ellipsis, tooltip },
  { title: i18NT('updatedAt'), dataIndex: 'updatedAt', format: 'time', width: 150, ellipsis, tooltip },
  { title: i18NT('action'), dataIndex: 'action', width: 120, fixed: 'right' },
];
